/**
 * Copyright 2007 Christian Mueller
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 * use this file except in compliance with the License. You may obtain a copy of 
 * the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by 
 * applicable law or agreed to in writing, software distributed under the License 
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
 * either express or implied. See the License for the specific language governing 
 * permissions and limitations under the License.
 * 
 * Description:
 * This file provide the options parser 
 * 
 */
 #ifndef OPTIONS_H_
#define OPTIONS_H_

typedef enum {
	OPTION_NULL, /*marks the end*/
	OPTION_BOOLEAN_TRUE,
	OPTION_BOOLEAN_FALSE,
	OPTION_DESCRIPTION,
	OPTION_INTEGER,
	OPTION_STRING
} option_type;

typedef struct {
	char* shortname;
	char* longname;
	option_type type;
	void *variable;
	const char* description;	
} options_param;

/** Please use this for strings **/
#define OPTIONS_MAX_STRING 512

/** Public functions **/
void options_printusage(options_param parameters[]);
int options_parse(options_param parameters[],int argc, char *argv[],int startposition);


#endif /*OPTIONS_H_*/
